<?php

/*
|--------------------------------------------------------------------------
| Routes File
|--------------------------------------------------------------------------
|
| Here is where you will register all of the routes in an application.
| It's a breeze. Simply tell Laravel the URIs it should respond to
| and give it the controller to call when that URI is requested.
|
*/

Route::get('/', function () {
    return view('welcome');
});
Route::any('foo', function () {
    return 'Hello World';
});

Route::any('phpinfo',function(){
    return phpinfo();
});
Route::any('viewDemo',function(){
    return view('test/viewDemo',[]);
});
Route::any('veiwDemo',function(){

    return view('demoImage',[
        'action'=>'user/image'
    ]);
});

Route::any("viewPicture",function(){
    return view('test/viewPicture',[]);
});

Route::any('uplaod/compress',[
    'as'=>"uplaod.compress",
    'uses'=>"Upload\TinyPngController@compress"
]);

Route::any('user/image',[
    'as'=>'user.image',
    'uses'=>'User\ManagerController@demoUploadFile'
]);

Route::any('user/edit',[
    'as'=>'user.edit',
    'uses'=>'User\ManagerController@editUserInfo'
]);

Route::any('merchant/register',[
    'as'=>'merchant.register',
    'uses'=>'Merchant\MerchantController@add'
]);
/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| This route group applies the "web" middleware group to every route
| it contains. The "web" middleware group is defined in your HTTP
| kernel and includes session state, CSRF protection, and more.
|
*/

Route::group(['middleware' => ['web']], function () {
    //
});

Route::any('user/add',[
    'as'=>'user.add',
    'uses'=>'User\ManagerController@addUser'
]);
// 分类
Route::any('category/list',[
    'as'=>'category.list',
    'uses'=>'Category\CategoryController@getList'
]);
Route::any('category/add',[
    'as'=>'category.add',
    'uses'=>'Category\CategoryController@add'
]);
